package com.designpatterns.decoratorpattern.decorator;

import com.designpatterns.decoratorpattern.component.Coffee;

public class DecoratorMilk extends CoffeeDecorator {
    Coffee coffee;

    public DecoratorMilk(Coffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public String getDescription() {
        return coffee.getDescription()+"+奶";
    }

    @Override
    public double cost() {
        return coffee.cost()+1.99;
    }
}
